package com.zhangpeng520.register.service;

import com.zhangpeng520.user.dao.UserMapper;
import com.zhangpeng520.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Administrator on 2017/8/10 0010.
 */
@Service("registerServiceimpl")
public class RegisterServiceimpl implements  RegisterService{

    @Autowired
    private UserMapper userMapper;

    @Transactional
    public int createUser(User user)
    {
         int number=-520;/*自定义数字*/
         number= userMapper.insertSelective(user);
        return number;
    }
}
